Optimal. Leaf size=88 \[ -\frac {i a^3 \cos ^3(c+d x)}{15 d}+\frac {a^3 \sin (c+d x)}{5 d}-\frac {a^3 \sin ^3(c+d x)}{15 d}-\frac {2 i a \cos ^5(c+d x) (a+i a \tan (c+d x))^2}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3577, 3567,
2713} \begin {gather*} -\frac {a^3 \sin ^3(c+d x)}{15 d}+\frac {a^3 \sin (c+d x)}{5 d}-\frac {i a^3 \cos ^3(c+d x)}{15 d}-\frac {2 i a \cos ^5(c+d x) (a+i a \tan (c+d x))^2}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2713
Rule 3567
Rule 3577
Rubi steps
\begin {align*} \int \cos ^5(c+d x) (a+i a \tan (c+d x))^3 \, dx &=-\frac {2 i a \cos ^5(c+d x) (a+i a \tan (c+d x))^2}{5 d}+\frac {1}{5} a^2 \int \cos ^3(c+d x) (a+i a \tan (c+d x)) \, dx\\ &=-\frac {i a^3 \cos ^3(c+d x)}{15 d}-\frac {2 i a \cos ^5(c+d x) (a+i a \tan (c+d x))^2}{5 d}+\frac {1}{5} a^3 \int \cos ^3(c+d x) \, dx\\ &=-\frac {i a^3 \cos ^3(c+d x)}{15 d}-\frac {2 i a \cos ^5(c+d x) (a+i a \tan (c+d x))^2}{5 d}-\frac {a^3 \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{5 d}\\ &=-\frac {i a^3 \cos ^3(c+d x)}{15 d}+\frac {a^3 \sin (c+d x)}{5 d}-\frac {a^3 \sin ^3(c+d x)}{15 d}-\frac {2 i a \cos ^5(c+d x) (a+i a \tan (c+d x))^2}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.33, size = 55, normalized size = 0.62 \begin {gather*} \frac {a^3 (5+9 \cos (2 (c+d x))-6 i \sin (2 (c+d x))) (-i \cos (3 (c+d x))+\sin (3 (c+d x)))}{30 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 126, normalized size = 1.43
method | result | size |
risch | \(-\frac {i a^{3} {\mathrm e}^{5 i \left (d x +c \right )}}{20 d}-\frac {i a^{3} {\mathrm e}^{3 i \left (d x +c \right )}}{6 d}-\frac {i a^{3} {\mathrm e}^{i \left (d x +c \right )}}{4 d}\) | \(56\) |
derivativedivides | \(\frac {-i a^{3} \left (-\frac {\left (\cos ^{3}\left (d x +c \right )\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{5}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15}\right )-3 a^{3} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {\left (\cos ^{2}\left (d x +c \right )+2\right ) \sin \left (d x +c \right )}{15}\right )-\frac {3 i a^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{5}+\frac {a^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) | \(126\) |
default | \(\frac {-i a^{3} \left (-\frac {\left (\cos ^{3}\left (d x +c \right )\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{5}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15}\right )-3 a^{3} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {\left (\cos ^{2}\left (d x +c \right )+2\right ) \sin \left (d x +c \right )}{15}\right )-\frac {3 i a^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{5}+\frac {a^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) | \(126\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 105, normalized size = 1.19 \begin {gather*} -\frac {9 i \, a^{3} \cos \left (d x + c\right )^{5} + i \, {\left (3 \, \cos \left (d x + c\right )^{5} - 5 \, \cos \left (d x + c\right )^{3}\right )} a^{3} - 3 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 5 \, \sin \left (d x + c\right )^{3}\right )} a^{3} - {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} a^{3}}{15 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 48, normalized size = 0.55 \begin {gather*} \frac {-3 i \, a^{3} e^{\left (5 i \, d x + 5 i \, c\right )} - 10 i \, a^{3} e^{\left (3 i \, d x + 3 i \, c\right )} - 15 i \, a^{3} e^{\left (i \, d x + i \, c\right )}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.23, size = 116, normalized size = 1.32 \begin {gather*} \begin {cases} \frac {- 24 i a^{3} d^{2} e^{5 i c} e^{5 i d x} - 80 i a^{3} d^{2} e^{3 i c} e^{3 i d x} - 120 i a^{3} d^{2} e^{i c} e^{i d x}}{480 d^{3}} & \text {for}\: d^{3} \neq 0 \\x \left (\frac {a^{3} e^{5 i c}}{4} + \frac {a^{3} e^{3 i c}}{2} + \frac {a^{3} e^{i c}}{4}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 929 vs. \(2 (74) = 148\).
time = 1.00, size = 929, normalized size = 10.56 \begin {gather*} \frac {1785 \, a^{3} e^{\left (8 i \, d x + 4 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 7140 \, a^{3} e^{\left (6 i \, d x + 2 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 7140 \, a^{3} e^{\left (2 i \, d x - 2 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 10710 \, a^{3} e^{\left (4 i \, d x\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 1785 \, a^{3} e^{\left (-4 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 1530 \, a^{3} e^{\left (8 i \, d x + 4 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) + 6120 \, a^{3} e^{\left (6 i \, d x + 2 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) + 6120 \, a^{3} e^{\left (2 i \, d x - 2 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) + 9180 \, a^{3} e^{\left (4 i \, d x\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) + 1530 \, a^{3} e^{\left (-4 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 1785 \, a^{3} e^{\left (8 i \, d x + 4 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 7140 \, a^{3} e^{\left (6 i \, d x + 2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 7140 \, a^{3} e^{\left (2 i \, d x - 2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 10710 \, a^{3} e^{\left (4 i \, d x\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 1785 \, a^{3} e^{\left (-4 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 1530 \, a^{3} e^{\left (8 i \, d x + 4 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 6120 \, a^{3} e^{\left (6 i \, d x + 2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 6120 \, a^{3} e^{\left (2 i \, d x - 2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 9180 \, a^{3} e^{\left (4 i \, d x\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 1530 \, a^{3} e^{\left (-4 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 255 \, a^{3} e^{\left (8 i \, d x + 4 i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 1020 \, a^{3} e^{\left (6 i \, d x + 2 i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 1020 \, a^{3} e^{\left (2 i \, d x - 2 i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 1530 \, a^{3} e^{\left (4 i \, d x\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 255 \, a^{3} e^{\left (-4 i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 255 \, a^{3} e^{\left (8 i \, d x + 4 i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 1020 \, a^{3} e^{\left (6 i \, d x + 2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 1020 \, a^{3} e^{\left (2 i \, d x - 2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 1530 \, a^{3} e^{\left (4 i \, d x\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 255 \, a^{3} e^{\left (-4 i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 384 i \, a^{3} e^{\left (13 i \, d x + 9 i \, c\right )} - 2816 i \, a^{3} e^{\left (11 i \, d x + 7 i \, c\right )} - 9344 i \, a^{3} e^{\left (9 i \, d x + 5 i \, c\right )} - 16896 i \, a^{3} e^{\left (7 i \, d x + 3 i \, c\right )} - 17024 i \, a^{3} e^{\left (5 i \, d x + i \, c\right )} - 8960 i \, a^{3} e^{\left (3 i \, d x - i \, c\right )} - 1920 i \, a^{3} e^{\left (i \, d x - 3 i \, c\right )}}{7680 \, {\left (d e^{\left (8 i \, d x + 4 i \, c\right )} + 4 \, d e^{\left (6 i \, d x + 2 i \, c\right )} + 4 \, d e^{\left (2 i \, d x - 2 i \, c\right )} + 6 \, d e^{\left (4 i \, d x\right )} + d e^{\left (-4 i \, c\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.57, size = 130, normalized size = 1.48 \begin {gather*} \frac {2\,a^3\,\left (15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,30{}\mathrm {i}-40\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,20{}\mathrm {i}+7\right )}{15\,d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,5{}\mathrm {i}-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,10{}\mathrm {i}+5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________